package petrochina.company.electric.model;

import java.util.Objects;

public class TaskFillResultData {

    // 区id
    private long operationId;

    // 站id
    private long stationId;

    // 用户id
    private long userId;

    // 电量
    private String degrees;

    public TaskFillResultData(long operationId, long stationId, long userId, String degrees) {
        this.operationId = operationId;
        this.stationId = stationId;
        this.userId = userId;
        this.degrees = degrees;
    }

    public long getOperationId() {
        return operationId;
    }

    public void setOperationId(long operationId) {
        this.operationId = operationId;
    }

    public long getStationId() {
        return stationId;
    }

    public void setStationId(long stationId) {
        this.stationId = stationId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getDegrees() {
        return degrees;
    }

    public void setDegrees(String degrees) {
        this.degrees = degrees;
    }

    @Override
    public String toString() {
        return "TaskFillResultData{" +
                "operationId=" + operationId +
                ", stationId=" + stationId +
                ", userId=" + userId +
                ", degrees='" + degrees + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TaskFillResultData)) return false;
        TaskFillResultData that = (TaskFillResultData) o;
        return getUserId() == that.getUserId();
    }

    @Override
    public int hashCode() {
        return Objects.hash(getUserId());
    }
}
